#include<pic18f458.h>

#pragma config FOSC=XT_XT, FCMEN=OFF, IESO=OFF, CPUDIV=OSC1_PLL2

#pragma config PWRT=ON, BOR=OFF, BORV=0, WDT=OFF, WDTPS=32768

#pragma config MCLRE=ON, LPT1OSC=OFF, PBADEN=OFF, CCP2MX=OFF

#pragma config STVREN=OFF, LVP=OFF, XINST=OFF, DEBUG=OFF

#pragma config CP0=OFF, CP1=OFF, CP2=OFF, CPB=OFF, CPD=OFF

#pragma config WRT0=OFF, WRT1=OFF, WRT2=OFF

#pragma config WRTB=OFF, WRTC=OFF, WRTD=OFF

#pragma config EBTR0=OFF, EBTR1=OFF, EBTR2=OFF, EBTRB=OFF

//CLK EXTERNO


void main(){



CANCON=0x08;
RXM1SIDH=0x00;  // acepta cualquier dato Mascara=0
RXM1SIDL=0x00;
RXB1DLC=1;
BRGCON1=0x00;
BRGCON2=0x93;
BRGCON3=0x02;

while(1){
while(PIR3==7); 

}

}
